package extensionTools.smvCreator;


/**
 * This class represents a general link which can be either a link or a relation in OPM.
 * @author Oshrit & Lital
 *
 */
public class Link 
{
        
        public enum SmvType {PROCESS, OBJECT, LINK, RELATION, STATE};
        
        public enum LinkType {PARTICULATION, CHARACTERIZATION, INSTANTIATION, UNIDIRECTIONAL, BIDIRECTIONAL, 
                                                  RESULT, CONSUMPTION,  EFFECT, CONDITION, INVOCATION, INSTRUMENT, AGENT, NOT_EXIST};                            
        
        private long srcId;
        private SmvType srcType;
        private long dstId;
        private SmvType dstType;
        private LinkType linkType;
        private String label;
        
        
        /**
         * Class constructor
         */
        public Link( long srcId, SmvType srcType, long dstId, SmvType dstType, LinkType linkType, String label)
        {
                this.srcId = srcId;
                this.srcType = srcType;
                this.dstId = dstId;
                this.dstType = dstType;
                this.linkType = linkType;
                this.setLabel(label);
                //xorList = new ArrayList<Link>();
                //orList = new ArrayList<Link>();
        }
        
        
        public void setSrcId(long srcId) {
                this.srcId = srcId;
        }
        public long getSrcId() {
                return srcId;
        }
        
        public void setSrcType(SmvType srcType) {
                this.srcType = srcType;
        }
        public SmvType getSrcType() {
                return srcType;
        }
        
        public void setDstId(long dstId) {
                this.dstId = dstId;
        }
        public long getDstId() {
                return dstId;
        }
        
        public void setDstType(SmvType dstType) {
                this.dstType = dstType;
        }
        public SmvType getDstType() {
                return dstType;
        }

        public void setLinkType(LinkType lnkType) {
                this.linkType = lnkType;
        }
        
        public LinkType getLinkType() {
                return linkType;
        }
        
        public void setLabel(String label) {
                this.label = label;
        }
        public String getLabel() {
                return label;
        }


}

